package com.xxx.corejava.day1021;

public class Test1 {

    public static void main(String[] args) {
        
        
        
        int i=1+1;
        System.out.println("i = " + i);
        
        i+=3;//i=i+3;

        System.out.println("i = " + i);

        i*=2;

        System.out.println("i = " + i);


        int a=5;
        int b=6;

        System.out.println(a==b);
        System.out.println(a!=b);

        String s1=new String("abc");
        String s2=new String("abc");

        System.out.println("s1 = " + s1);
        System.out.println("s2 = " + s2);

        System.out.println(s1==s2);

        System.out.println(5/2);
        System.out.println(5.0/2);


        System.out.println(5%2);//1
        System.out.println(-5%2);//-1
        System.out.println(5%-2);//1
        System.out.println(-5%-2);//-1

        System.out.println(11<<3);

        System.out.println(11>>2);

        System.out.println(-1>>3);

        System.out.println(-1>>>3);


        int a1=12;
        int b1=11;

        System.out.println(a1&b1);
        System.out.println(a1|b1);
        System.out.println(a1^b1);

        int n=-1;
        System.out.println(~n);


////        1<a<7
////        1<a  && a<7
//
//        //2-6 password
//        password<2 || password>6
//                密码错误

        String username=null;

        //有用户名的值  并且  值不是空白
        if(username!=null && !username.equals("")){
           //有用户名的情况
            System.out.println(username);
        }else{
            System.out.println("用户名不能为空");
        }





    }
}
